home *** CD-ROM | disk | FTP | other *** search
- /* pXFCN.c
- A template program for running XCMD's and XFCN's as
- part of regular applications.
-
- Written by Gerry H. Kenner, Ph.D.
- */
-
- #include "pXFCN.h"
-
- main()
- { /* Main procedure of pXFCN */
- Handle TempHdl;
- Rect TheRect;
- WindowPtr WPtr;
- long TempLong;
- Str255 TempStr;
-
- InitGraf(&thePort);
- InitFonts();
- FlushEvents( everyEvent, 0 );
- InitWindows();
- InitMenus();
- TEInit();
- InitDialogs(0L);
- InitCursor();
-
- SetRect(&TheRect, screenBits.bounds.left, screenBits.bounds.top + 38, screenBits.bounds.right,
- screenBits.bounds.bottom);
- WPtr = NewWindow(0L, &TheRect, "\ppXFCN", TRUE, documentProc, (WindowPtr)-1L, TRUE,
- 0L);
- SetPort(WPtr);
-
- TempHdl = LoadXCMD(3, "pXFCN", "5", "Hello World!");
-
- CtoPstr((char*)*TempHdl);
- MoveTo(50,50);
- DrawString((char*)*TempHdl);
- Delay(60L, &TempLong);
-
- HUnlock(TempHdl);
- DisposHandle(TempHdl);
- } /* end Main procedure of pXFCN */